package com.designed.pattern.creational.factorymethod.core;

/**
 * @author yifei
 * @description
 * @date 2024/1/1
 **/
public class Div extends Operation {
    @Override
    public double getResult(double numberA, double numberB) {
        if (numberB == 0) {
            System.out.println("除数不能为0");
            throw new ArithmeticException();
        }
        return numberA / numberB;
    }
}
